package com.heima.utils.common;


public class ThreadLocalUtils {
    private static ThreadLocal<Integer> threadLocal = new ThreadLocal<>();


    public static void setUserId(Integer userId){
        threadLocal.set(userId);
    }

    public static Integer getUserId(){
        return threadLocal.get();
    }

    public static void delete(){
        threadLocal.remove();
    }
}
